<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<table>
    <thead>
    <tr style="font-weight: bolder">
        <td>编号</td>
        <td>用户</td>
        <td>分类</td>
        <td>题目类型</td>
        <td>题干</td>
        <td>答案选项</td>
        <td>正确答案</td>
        <td>题目状态</td>
        <td>分数</td>
        <td>题目难度</td>
        <td>试题解析</td>
    </tr>
    </thead>
    <tbody>

    @foreach($question as $q)
    <tr>
        <td>{{ $q->id }}</td>
        <td>{{ $q->user->username }}</td>
        <td>{{ $q->category->name }}</td>
        <td>{{ $q->type }}</td>
        <td>{{ $q->content }}</td>
        <td>{{ json_encode($q->answer, true) }}</td>
        <td>{{ $q->success_answer }}</td>
        <td>{{ $q->status ? '审核通过' : '审核中' }}</td>
        <td>{{ $q->fraction }}</td>
        <td>{{ $q->level }}</td>
        <td>{{ $q->analysis }}</td>
    </tr>
    @endforeach

    </tbody>
</table>
</body>
</html>
